#pragma once
#ifndef __EVENT__INCLUDED__HH__
#define __EVENT__INCLUDED__HH__

#include <string>
#include <OgreLogManager.h>
#include "LitPrerequisites.h"
#include "LitTokeniser.h"

namespace Lit
{
	enum EventCode
	{
		EC_RUNTIME_ERROR,
		EC_ENGINE_INITIALISED,
		EC_ENGINE_SHUTDOWN
	};

	struct  LIT_API Event{
		EventCode	Code;
		Tokeniser	Tokens;
	};

	enum EventState
	{
		ES_PROPAGATE,
		ES_CONSUME
	};

	class LIT_API EventListener{
		String mName;
	public:
		EventListener(const String & name=""):mName(name){}
		virtual ~EventListener(){}

		virtual EventState eventReceived( const Event & evt ) = 0;

		const String &getName() const{ return mName; }
	};
};

#endif